
var timer=0;
function goright() {
	if(document.getElementById("sixth-floor-ul").offsetLeft==0){
		document.getElementById("first-i").style.color="black";
		timer=setInterval(move,30);
	}	
	else {
		return;
	}
}
function goleft() {
	if(document.getElementById("sixth-floor-ul").offsetLeft==-document.getElementById("sixth-floor-ul").clientWidth/2)
		timer=setInterval(move1,30);
	else {
		return;
	}
}
function move() {
	var UL=document.getElementById("sixth-floor-ul");
	var ul_width=UL.clientWidth;
	var ul_left=UL.offsetLeft;
	if(ul_left!=-ul_width/2)
		UL.style.left=ul_left-64+"px";
	else {
		clearInterval(timer);
	}
}
function move1() {
	var UL=document.getElementById("sixth-floor-ul");
	var ul_left=UL.offsetLeft;
	if(ul_left!=0)
		UL.style.left=ul_left+64+"px";
	else {
		clearInterval(timer);
	}
}
